package com.ling.dao;

import com.ling.bean.User;
import com.ling.bean.UserExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    //定制查询，查询areaid排名较前的用户列表
    List<String> getUserOrderByAreaId(String areaId);

    //定制，查询指定用户关注的用户
    List<User> getFollowingUsers(String userId);

    //定制，查询指定用户的粉丝
    List<User> getFans(String userId);

    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(String id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}